// 引入CSS2渲染器CSS2DRenderer和CSS2模型对象CSS2DObject
// import { CSS3DObject } from 'three/addons/renderers/CSS3DRenderer.js';
import { CSS2DObject } from 'three/addons/renderers/CSS2DRenderer.js';
function tag(name){
    const div = document.getElementById('cityName').cloneNode()
    div.innerHTML = name
    div.style.marginLeft = (name.length*8+20)+'px';//HTML标签偏移
    // div.style.marginTop = '-8px';//HTML标签偏移
    const css3dObject = new CSS2DObject(div)
    div.style.pointerEvents = 'none';//避免HTML标签遮挡三维场景的鼠标事件
    return css3dObject
}
export {tag}